﻿export default [
  //name 和 icon分别代表生成菜单项的文本和图标
  {
    path: '/user',
    layout: false,
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './User/Login',
      },
      {
        component: './404',
      },
    ],
  },
  {
    path: '/welcome',
    name: '欢迎',
    icon: 'smile',
    component: './Welcome',
  },
  {
    path: '/sales/index',
    name: '销量数据',
    icon: 'RadarChartOutlined',
    component: './sales/index',
  },
  {
    path: '/Marketing/index',
    name: '营销活动',
    icon: 'AccountBookOutlined',
    component: './Marketing/index',
  },
  {
    path: '/admin',
    name: 'admin',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      {
        path: '/admin/sub-page',
        name: 'sub-page',
        icon: 'smile',
        component: './Welcome',
      },
      {
        component: './404',
      },
    ],
  },
  {
    name: '商品库存管理',
    icon: 'CarryOutOutlined',
    path: '/stock',
    routes: [
      {
        path: '/stock/index',
        name: '商品管理',
        component: './stock/index',
      },
      {
        path: '/stock/online',
        name: '网店管理',
        component: './stock/online',
      },
      {
        path: '/stock/inbound',
        name: '入库管理',
        component: './stock/inbound',
      },
      {
        path: '/stock/outbound',
        name: '出库管理',
        component: './stock/outbound',
      },
    ],
  },
  {
    path: '/',
    redirect: '/welcome',
  },
  {
    component: './404',
  },
];
